package com.hybao.login.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hybao.service.login.LoginService;

@Controller
@RequestMapping("/login/website")
public class LoginController {
	private LoginService loginService;
	public LoginService getLoginService() {
		return loginService;
	}

	public void setLoginService(LoginService loginService) {
		this.loginService = loginService;
	}

	@RequestMapping(value="{name}/{passwd}", method = RequestMethod.GET)
	public @ResponseBody Map<String,String> getLoginInfoJSON(@PathVariable String name,@PathVariable String passwd) {
		Map<String,String> loginMap = new HashMap<String,String>();
		loginMap.put("result", "中文");
		//TODO
//		loginService.checkLogin(name, passwd);
		return loginMap;
	}
}
